package com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.data.converter;

import com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.model.api.request.container.QueryByChaincodeApiReq;
import com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.model.api.request.container.SendApiReq;
import com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.model.api.response.container.QueryByChaincodeApiRes;
import com.zhangfb95.crosschain.plugin.client.java.fabric2.infra.model.api.response.container.SendApiRes;
import com.zhangfb95.crosschain.protocol.routerpluginapi.request.QueryPluginReq;
import com.zhangfb95.crosschain.protocol.routerpluginapi.request.SendPluginReq;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.QueryPluginRes;
import com.zhangfb95.crosschain.protocol.routerpluginapi.response.SendPluginRes;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhangfubing
 * @since 2023/12/4
 */
@Mapper
public interface PluginConverter {

    PluginConverter INSTANCE = Mappers.getMapper(PluginConverter.class);

    QueryByChaincodeApiReq convert(QueryPluginReq req);

    SendApiReq convert(SendPluginReq req);

    QueryPluginRes convert(QueryByChaincodeApiRes res);

    SendPluginRes convert(SendApiRes res);
}
